<!DOCTYPE html>
<!-- saved from url=(0031)http://evalor.cn/websocket.html -->
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/css/animate.min.css">
    <link rel="stylesheet" href="/static/css/wstool.css">
    <script src="/static/plugins/jquery/jquery-2.1.4.min.js"></script>
    <script src="/static/plugins/layer/layer.js"></script>
    <script src="/static/js/common.js"></script>
<title>微聊 -   | 首页</title>
</head>
<body>
<div id="root"><!---->
  <nav class="navbar navbar-dark bg-primary">
      <div class="container"><a href="index.html" class="navbar-brand monospace"><span>微聊</span> <small>让生活更美好</small></a> <a href="javascript:" role="button" id="logout" class="btn btn-primary">退出</a></div>
  </nav>
  <div class="container mt-3 main-container">
    <div class="row monospace">
    	<div class="col-sm-12" style="border:1px solid #CCC; height:650px; background:#EEE">
        	<h5 style="margin:20px 0 0 10px;">房间列表</h5>
            <hr class="divider divider-dashed">
            <div id="root_item"></div>
            <div style="clear:both"></div>
        </div>
    </div>
  </div>
</div>
<script>
    var roomData = getAjax('index/room');
    if(roomData.code != 200){
        layer.msg(roomData.msg)
    }else{
        $.each(roomData.result,function(index,item){
            $('#root_item').append('<div class="room_list"><a href="intoRoom?id='+item.id+'"><img src="'+item.cover_image+'"></a><br>'+item.room_name);
        })
    }
</script>
<script src="/static/js/footer.js"></script>
<script src="/static/js/tongji.js"></script>
</body>
</html>
